test palindromicity python